<%@ page import="com.dzxcqmxm.JB.Album" %>
<%@ page import="com.dzxcqmxm.Dao.AlbumDao" %>
<%@ page import="com.dzxcqmxm.Dao.impl.AlbumDaoImpl" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="com.dzxcqmxm.Dao.impl.XtDaoImpl" %>
<%@ page import="com.dzxcqmxm.Dao.XtDao" %>
<%@ page import="com.dzxcqmxm.JB.Xt" %><%--
  Created by IntelliJ IDEA.
  User: Payboi
  Date: 2022/6/2
  Time: 18:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>相册分类</title>
    <style>
        body{ background:#E0FFFF}
        img{
            width: 100px;
        }
        .album{
            float:left;
            width: 102px;
            /*设置文本居中就对了！！*/
            text-align:center;
        }
        .l{
            width: 50%;
            float: left;
        }
    </style>
</head>
<body>
<h1>这是相册分类页面</h1>
<div class="l">
<form action="/dzxc/XiangCheFenLeiServlet" method="post">
    增加系统相册分类：<input type="text" name="addXT"/>
    <input type="submit" value="提交"/>
</form>
</div>
<div class="l">
    <form action="/dzxc/delXTXCServlet" method="post">
        删除系统相册分类：<input type="text" name="delXT"/>
        <input type="submit" value="提交"/>
    </form>
</div>

<p>-------------------------------------------------------------------------------------------------------</p>
<%--准备展示相册--%>
<%
    XtDao xtDao = new XtDaoImpl();

    ArrayList<Xt> xtArrayList = new ArrayList<Xt>();

    try {
        xtArrayList=xtDao.findAllXt();
        System.out.println("相册分类页面的xtArrayList"+xtArrayList);
    } catch (Exception e) {
        e.printStackTrace();
    }
    if(xtArrayList!=null&&xtArrayList.size()>0){
        for(Xt xt:xtArrayList){
            %>
<div class="album">
    <img src="../img/album.png">
    <p><%     out.println("<tr><td>"+xt.getXTXCName()+"</td>");          %></p>
</div>



<%
        }
    }

%>


</body>
</html>
